namespace Jumpton.SFA.Server.Entity {
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Jumpton.Persistent;
    using System.Data;
    using System.Runtime.Serialization;
    
    
    [System.SerializableAttribute()]
    [Map("TableConfig")]
    public class TableConfig : ObjectRow {
        
        public TableConfig() {
        }
        
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dataRow">DataTable 中的一行数据</param>
        /// <param name="objectTable">存储当前对象的数据表格</param>
        public TableConfig(System.Data.DataRow dataRow, ObjectTable parent) : 
                base(dataRow, parent) {
        }
        
        /// <summary>
        /// 供反序列化使用的构造函数
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected TableConfig(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                base(info, context) {
        }
        
        [Key("ID",true,true)]
        public decimal ID {
            get {
                return (System.Decimal)GetValue("ID");
            }
            set {
                SetValue("ID", value);
            }
        }
        
        [Field("TableName")]
        public string TableName {
            get {
                return (System.String)GetValue("TableName");
            }
            set {
                SetValue("TableName", value);
            }
        }
        
        [Field("ColumnName")]
        public string ColumnName {
            get {
                return (System.String)GetValue("ColumnName");
            }
            set {
                SetValue("ColumnName", value);
            }
        }
        
        [Field("Title")]
        public string Title {
            get {
                return (System.String)GetValue("Title");
            }
            set {
                SetValue("Title", value);
            }
        }

        [Field("ListItem")]
        public string ListItem
        {
            get
            {
                return (System.String)GetValue("ListItem");
            }
            set
            {
                SetValue("ListItem", value);
            }
        }
        
        [Field("Type")]
        public byte Type {
            get {
                return (byte)GetValue("Type");
            }
            set {
                SetValue("Type", value);
            }
        }
        
        [Field("Enabled")]
        public bool Enabled {
            get {
                return (System.Boolean)GetValue("Enabled");
            }
            set {
                SetValue("Enabled", value);
            }
        }
        
        [Field("IsActive")]
        public bool IsActive {
            get {
                return (System.Boolean)GetValue("IsActive");
            }
            set {
                SetValue("IsActive", value);
            }
        }
        
        [Field("LastUpdate")]
        public System.DateTime LastUpdate {
            get {
                return (System.DateTime)GetValue("LastUpdate");
            }
            set {
                SetValue("LastUpdate", value);
            }
        }

        [Field("Description")]
        public string Description
        {
            get
            {
                return (System.String)GetValue("Description");
            }
            set
            {
                SetValue("Description", value);
            }
        }
    }
}
